<template>
  <div class="border-line card">
    <div class="card-content">
      <div class="table">
        <div class="header">
          <div class="col">业务编号</div>
          <div class="col">运营类型</div>
          <div class="col">发起人</div>
          <div class="col">联系电话</div>
          <div class="col">时间</div>
          <div class="col ">审核结果</div>
        </div>
        <vue-seamless-scroll :data="listData" :class-option="classOption" class="scroll-warp">
          <ul class="item">
            <li v-for="(item, index) in listData" :key="index">
              <span class="col text-error">{{ item.YWBH }}</span>
              <span class="col">{{ item.YWLX }}</span>
              <span class="col">{{ item.FQR }}</span>
              <span class="col">{{ item.LXDH }}</span>
              <span class="col">{{ item.FQSJ | moment('YYYY-MM-DD') }}</span>
              <!-- <Ellipsis class="col" tooltip :length="16">2023-2-3 16:08:49</Ellipsis> -->
              <span class="col" :class="item.SHJG === '审核中' ? 'text-warning' : item.SHJG === '审核完成' ? 'text-success' : 'text-primary'" >{{ item.SHJG }}</span>
            </li>
          </ul>
        </vue-seamless-scroll>
      </div>
    </div>
  </div>
</template>

<script>
/**
 *Parser
 *@Author
 *@Version
 *@property
 *@event
 */
import vueSeamlessScroll from 'vue-seamless-scroll'
import { Ellipsis } from '@/components'
import { getGDZCYY } from '@/api/datacharts'
export default {
  components: {
    vueSeamlessScroll,
    Ellipsis
  },
  data () {
    return {
      classOption: {
        singleHeight: 40
      },
      listData: []
    }
  },
  created () {
    this.fetchData()
  },
  methods: {
    fetchData () {
      getGDZCYY().then(res => {
        this.listData = res
      })
    }
  }
}
</script>
<style lang="less" scoped>
.card {
  height: 244px;
  width: 100%;
  .count {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    &-item {
      flex: 1;
      border-left: 4px solid #07d6de;
      font-size: 16px;
      padding-left: 10px;

      .num {
        font-size: 24px;
        color: #ffc600;
      }
      .unit {
        color: #64d1e4;
        margin-left: 10px;
      }
    }
  }
  .table {
    .col {
      flex: 1;
    }

    .header {
      background: #0f3560;
      font-size: 16px;
      padding: 0 18px;
      color: #fff;
      display: flex;
      justify-content: space-between;
      height: 40px;
      line-height: 40px;
    }

    .scroll-warp {
      height: 160px;
      width: 100%;
      margin: 0 auto;
      overflow: hidden;
      ul {
        list-style: none;
        padding: 0;
        margin: 0 auto;
        li {
          height: 40px;
          line-height: 40px;
          padding: 0 18px;
          color: #61a8ff;
          position: relative;
          font-size: 14px;
          display: flex;
          justify-content: space-between;
        }
      }
    }
  }
}
</style>
